package com.svtar.ywg.utils;

import android.content.Context;

/**
 * Created by Svtar on 2019/4/2.
 * app包相关工具
 */

public class PackageUtils {
    /**
     * 获取微信版本
     *
     * @param paramContext
     * @return
     */
    public static String getVersionName(Context paramContext) {
        try {
            String name;
            String str = paramContext.getPackageManager().getPackageInfo(paramContext.getPackageName(), 0).versionName;
            StringBuilder stringBuilder = new StringBuilder();
            stringBuilder.append("V");
            stringBuilder.append(str);
            name = stringBuilder.toString();
            return name;
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }
}
